package com.atguigu.domain;

import com.atguigu.service.Status;

/**
 * @author : leimingchao
 * @date Date : 2021年09月14日 23:52
 */
public class Programmer extends Employee {

    /**
     * 开发团队中的id
     */
    private int memberId;

    private Status status = Status.FREE;

    private Equipment equipment;

    public Programmer() {
    }

    public Programmer(int id, String name, int age, double salary,Equipment equipment) {
        super(id, name, age, salary);
        this.equipment = equipment;
    }

    public int getMemberId() {
        return memberId;
    }

    public void setMemberId(int memberId) {
        this.memberId = memberId;
    }

    public Status getStatus() {
        return status;
    }

    public void setStatus(Status status) {
        this.status = status;
    }

    public Equipment getEquipment() {
        return equipment;
    }

    public void setEquipment(Equipment equipment) {
        this.equipment = equipment;
    }

    @Override
    public String toString() {
        return getDetails() + "\t程序员\t" + status + "\t\t\t" + equipment.getDescription();
    }

    public String getTeamBaseDetails() {
        return getMemberId() + "/" + getId() + "\t" + getName() + "\t" + getAge() + "\t" + getSalary();
    }

    public String getDetailsForTeam() {
        return getTeamBaseDetails() + "\t程序员" ;
    }
}
